package com.yipei.business.service.impl;

import java.util.List;
import com.yipei.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yipei.business.mapper.MlServiceMessageMapper;
import com.yipei.business.domain.MlServiceMessage;
import com.yipei.business.service.IMlServiceMessageService;

/**
 * 服务消息Service业务层处理
 * 
 * @author yipei
 * @date 2024-12-23
 */
@Service
public class MlServiceMessageServiceImpl implements IMlServiceMessageService 
{
    @Autowired
    private MlServiceMessageMapper mlServiceMessageMapper;

    /**
     * 查询服务消息
     * 
     * @param id 服务消息主键
     * @return 服务消息
     */
    @Override
    public MlServiceMessage selectMlServiceMessageById(Long id)
    {
        return mlServiceMessageMapper.selectMlServiceMessageById(id);
    }

    /**
     * 查询服务消息列表
     * 
     * @param mlServiceMessage 服务消息
     * @return 服务消息
     */
    @Override
    public List<MlServiceMessage> selectMlServiceMessageList(MlServiceMessage mlServiceMessage)
    {
        return mlServiceMessageMapper.selectMlServiceMessageList(mlServiceMessage);
    }

    /**
     * 新增服务消息
     * 
     * @param mlServiceMessage 服务消息
     * @return 结果
     */
    @Override
    public int insertMlServiceMessage(MlServiceMessage mlServiceMessage)
    {
        mlServiceMessage.setCreateTime(DateUtils.getNowDate());
        return mlServiceMessageMapper.insertMlServiceMessage(mlServiceMessage);
    }

    /**
     * 修改服务消息
     * 
     * @param mlServiceMessage 服务消息
     * @return 结果
     */
    @Override
    public int updateMlServiceMessage(MlServiceMessage mlServiceMessage)
    {
        mlServiceMessage.setUpdateTime(DateUtils.getNowDate());
        return mlServiceMessageMapper.updateMlServiceMessage(mlServiceMessage);
    }

    /**
     * 批量删除服务消息
     * 
     * @param ids 需要删除的服务消息主键
     * @return 结果
     */
    @Override
    public int deleteMlServiceMessageByIds(Long[] ids)
    {
        return mlServiceMessageMapper.deleteMlServiceMessageByIds(ids);
    }

    /**
     * 删除服务消息信息
     * 
     * @param id 服务消息主键
     * @return 结果
     */
    @Override
    public int deleteMlServiceMessageById(Long id)
    {
        return mlServiceMessageMapper.deleteMlServiceMessageById(id);
    }
}
